package cn.mygweb.admin.modules.sys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.mygweb.admin.modules.sys.mapper.RoleMenuMapper;
import cn.mygweb.admin.modules.sys.pojo.RoleMenu;
import cn.mygweb.admin.modules.sys.service.RoleMenuService;

/** 
* <p>Title: RoleMenuServiceImpl.java</p>
* <p>Description: </p>  
* @author gxb 
* @date 2019年6月8日 
* <p>Copyright: Copyright (c) 2019</p>
* <p>Company: www.mygweb.cn</p> 
*/
@Service
public class RoleMenuServiceImpl implements RoleMenuService{

	@Autowired
	private RoleMenuMapper roleMenuMapper;
	
	/**
	 * <p>Title: deleteByRId</p>
	 * <p>Description: 删除角色对应的所有信息</p>
	 * @param rId
	 * @see cn.mygweb.admin.modules.sys.service.RoleMenuService#deleteByRId(java.lang.String)
	 */
	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public void batchDeleteByRId(String rId) {
		roleMenuMapper.batchDeleteByRId(rId);
	}

	/**
	 * <p>Title: insert</p>
	 * <p>Description: 插入角色-菜单信息</p>
	 * @param menu
	 * @see cn.mygweb.admin.modules.sys.service.RoleMenuService#insert(cn.mygweb.admin.modules.sys.pojo.Menu)
	 */
	@Override
	public void insertRMList(List<RoleMenu> rmList) {
		roleMenuMapper.insertRMList(rmList);
	}

}
